*{
    margin:0;
    padding: 0;
}
html,body{
    height: 100%;
    font: size 14px;
}
.header{
    height: 56px;
    line-height: 56px;
    background: #3b3a3f;
    text-align: center;
    font-size:18px;
    color:#fff;
    font-weight: bold;
}
.main{
    background-color: #f5f5f5;
    padding:20px;
    box-sizing: border-box;
    overflow-y: scroll;
    height: calc(100% - 108px);
    max-height: calc(100% - 108px);
} 
.chat-container > *{
    float: left;
}
.chat-container>img{
    width: 40px;
    border-radius: 50%; 
}
.chat-container.avatar-container>*{
    float: right;
}
.chat-txt{
    max-width: 251px;
    padding: 8px;
    box-sizing: border-box;
    background:#fff;
    border:1px solid #d8d8d8;
    color:#333;
    border-radius:6px;
    margin-left:10px;
    margin-bottom:20px;
}
.chat-container.avatar-container .chat-txt{
    margin-right: 10px;
    background-color:#98e855;
    position: relative;
}
.clearfix{
    content:"";
    display: block;
    clear:both;
}
.chat-container.avatar-container>.chat-txt:after{
    position: absolute;
    content:"";
    width: 0;
    padding: 0;
    border:6px solid transparent;
    border-left-color:#98e855;
    top:50%;
    right: -12px;
    margin-top:-6px;
}
.footer{
    position: absolute;
    width: 100%;
    left: 0;
    bottom:0;
    height: 52px;
    line-height:52px;
    background-color:#ebebeb;
    box-sizing: border-box;
    box-shadow:0 -2px 5px #d8d8d8;
    text-align:center;
}
.input{
    width: 80%;
    height: 36px;
    margin:0;
    padding:5px 10px;
    border:1px solid #d8d8d8;
    color:#333;
    box-sizing: border-box;
    background-color:#fff;
    border-radius:18px;
    outline:none; 
}
.sent-btn{
    width: 54px;
    height: 34px;
    line-height:34px;
    text-align:center;
    color:#fff;
    background-color:#02cb0b;
    display: inline-block;
}